package team.seekers.hula.teamwork.todo.entity.dao;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import team.seekers.hula.common.entity.enums.todo.TodoStatusEnum;
import team.seekers.hula.common.entity.enums.todo.TodoTypeEnum;

import java.io.Serializable;
import java.util.Date;

/**
 * 一个待办
 * @author hbc
 * @author yiming
 * @since 2021-05-05
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Todo对象", description="一个混合待办（定位今日待办）")
@TableName(value = "todo")
public class TodoDO implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    private String userId;

    @ApiModelProperty(value = "个人待办标题")
    private String title;

    @ApiModelProperty(value = "个人待办标签")
    private String tags;

    @ApiModelProperty(value = "链接到团队todo")
    private String teamTodoId;

    @ApiModelProperty(value = "链接到团队todo标题")
    private String teamTodoTitle;

    @ApiModelProperty(value = "是否是今日待办 1（true）是， 0（false）否")
    private Integer isToday;

    @ApiModelProperty(value = "该待办绑定的hula币")
    private Double hulaCoin;

    @ApiModelProperty(value = "实际todo的截止时间")
    private Date gmtEnd;

    @ApiModelProperty(value = "待办状态")
    @JsonValue
    private TodoStatusEnum status;

    @ApiModelProperty(value = "待办类型")
    @JsonValue
    private TodoTypeEnum type;

    @TableLogic
    private Integer isDelete;

    @TableField(fill = FieldFill.INSERT)
    private Date gmtCreate;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;


}
